import Vue from 'vue'
import App from '@/App.vue'
import router from '@/router'
import store from '@/store'

// 重置默认样式
import '@/reset.scss'

Vue.config.productionTip = false

// 全局过滤器
Vue.filter('FixCup', value => {
  if (value === 0) {
    value = '小杯'
    return value
  } else if (value === 1) {
    value = '中杯'
    return value
  } else if (value === 2) {
    value = '大杯'
    return value
  }
})
Vue.filter('FixState', value => {
  switch (value) {
    case 1:
      return '已完成'
    case 0:
      return '待支付'
    case 2:
      return '已下单'
  }
})
Vue.filter('FixTemperature', value => {
  if (value === 0) {
    value = '常温'
    return value
  } else if (value === 1) {
    value = '冰饮'
    return value
  } else if (value === 2) {
    value = '热饮'
    return value
  }
})

Vue.filter('FixSweetness', value => {
  if (value === 0) {
    value = '全糖'
    return value
  } else if (value === 1) {
    value = '半糖'
    return value
  } else if (value === 2) {
    value = '无糖'
    return value
  }
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
